﻿#pragma once

#include "CmdHandler3.h"
#include "Arc3D.h"

class Scene;
class PointHandler;

class Radius3DHandler : public CmdHandler3
{
	Q_OBJECT
public:
	Q_INVOKABLE Radius3DHandler();
	~Radius3DHandler();

	virtual void input(const QVariant& data, const QString& rawInput, CommandSource cs) override;
	void drawFinish(Scene* scene);
	double calRadius(const osg::Vec3d& center, const osg::Vec3d& worldPt);
private:
	std::shared_ptr<Arc3D> m_arc;
	std::shared_ptr<Arc3D> m_originArc;
	std::shared_ptr<PointHandler> m_pointStateMachine;
	osg::Matrix m_matrix;
};
